home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
tvalt.exe
/
TESTTXT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-05
|
782b
|
44 lines
#define Uses_TApplication
#define Uses_TMenuBar
#define Uses_TSubMenu
#define Uses_TMenuItem
#define Uses_TKeys
#include <tv.h>
extern Boolean useAltWriteMethod;
class TMyApp : public TApplication
{
public:
TMyApp();
static TMenuBar *initMenuBar( TRect r );
};
TMyApp::TMyApp() :
TProgInit( &TMyApp::initStatusLine, &TMyApp::initMenuBar,
&TMyApp::initDeskTop )
{
}
TMenuBar *TMyApp::initMenuBar( TRect r )
{
r.b.y = r.a.y+1;
return new TMenuBar( r,
*new TSubMenu( "~F~ile", 0 )+
*new TMenuItem( "E~x~it", cmQuit, kbAltX, hcNoContext, 0 )
);
}
int main()
{
TMyApp app;
useAltWriteMethod = True;
// Not needed if USEWRITE.OBJ is linked instead of NOWRITE.OBJ.
app.run();
app.shutDown();
return 0;
}